package com.netposa.datawarehouse.aggregator.factory;

import com.netposa.datawarehouse.aggregator.factory.service.SearchData;
import com.netposa.datawarehouse.aggregator.web.model.SearchDataType;
import org.springframework.stereotype.Component;

@Component
public class SearchDataFactory {
   public static SearchData getSearchData(SearchDataType type) {
      switch (type) {
         case VEHICLE:
            return new VehicleSearch();
         case NONMOTOR:
            return new NonmotorSearch();
         case FACE:
            return new FaceSearch();
         case BODY:
            return new BodySearch();
         default:
            return null;
      }
   }
}
